package com.sf.fy.uav.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sf.fy.uav.entity.AirportInfo;
import com.sf.fy.uav.mapper.AirportInfoMapper;
import com.sf.fy.uav.service.IAirportInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 航站信息，用于维护要展示的航站列表数据 服务实现类
 * </p>
 *
 * @author LTQ
 * @since 2024-02-20
 */
@Service
public class AirportInfoServiceImpl extends ServiceImpl<AirportInfoMapper, AirportInfo> implements IAirportInfoService {

    @Autowired
    private AirportInfoMapper airportInfoMapper;

    @Override
    public List<AirportInfo> getList() {
        QueryWrapper<AirportInfo> airportInfoQueryWrapper = new QueryWrapper<>();
        airportInfoQueryWrapper.eq("enable", true);
        airportInfoQueryWrapper.eq("deleted", false);
        airportInfoQueryWrapper.orderByAsc("sort");
        return airportInfoMapper.selectList(airportInfoQueryWrapper);
    }
}
